package factory.abstractfactory;

/**
 * @ClassName FactoryProducer
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/7/15 10:36
 * @Version 1.0
 */
public class FactoryProducer {
	public static AbstractFactory getFactory(String type){
		if ("sharp".equalsIgnoreCase(type)) {
			return new SharpFactory();
		} else if ("color".equalsIgnoreCase(type)) {
			return new ColorFactory();
		}else {
			throw new IllegalArgumentException("不支持的操作类型");
		}
	}
}
